home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Games Machine 76
/
XENIATGM66.iso
/
Indiana Jones
/
Indiana Jones.exe
/
RESOURCE
/
PREVIEW.GOB
/
cog_tem_ent2mmfog.cog
< prev
next >
Wrap
Text File
|
1999-11-15
|
2KB
|
90 lines
# Jones 3D Cog Script
#
# TEM_Ent2MMFog.cog
#
# [MDR] && [TRM]
#
# (C) 1999 LucasArts Entertainment Co. All Rights Reserved
# ========================================================================================
symbols
message startup
message entered
message pulse
thing player local
thing fogGhost
sector connect
sector mazeRoom
vector vec_facing local
int inConnect=0 local
end
# ========================================================================================
code
startup:
player = GetLocalPlayerThing();
return;
# ========================================================================================
entered:
if(GetSenderRef() == connect)
{
Print("entered connect");
inConnect = 1;
SetPulse(0.5);
}
if(GetSenderRef() == mazeRoom)
{
Print("entered mazeRoom");
inConnect = 0;
SetPulse(0.0);
}
return;
# ========================================================================================
pulse:
vec_facing = VectorSub( GetThingPos(fogGhost), GetThingPos(player));
vec_facing = VectorNorm(vec_facing);
if(inConnect == 1)
{
if (VectorDot(GetThingLVec(player), vec_facing) >= 0)
{
# Player is facing fogGhost
# set distances for entrance room
SetFog(1, '0.5, 0.05 0.05', 20, 80);
}
else
{
# player's back is to fogGhost
# set distances for melt maze
SetFog(1, '0.5, 0.05 0.05', 50, 150);
}
}
else
return;
return;
# ========================================================================================
end